@extends('common.admin-master')

@section('html-body')
    <div class="content">

        <div class="header">
            <div class="stats">
                <p class="stat"><a href="{{route('Admin')}}">返回首页</a></p>
            </div>
            <h1 class="page-title">审核管理</h1>
        </div>

        <div class="container-fluid">
            <div class="row-fluid">

                <div class="row-fluid">
                    <div class="block span12">
                        <a href="#tablewidget" class="block-heading" data-toggle="collapse">审核投资机构列表<span class="label
                        label-warning">+{{count($orgs)}}</span></a>
                        <div id="tablewidget" class="block-body collapse in">
                            <table class="table">
                                <thead>
                                <tr>
                                    <th width="15%">机构名</th>
                                    <th width="15%">成立时间</th>
                                    <th width="15%">总资本</th>
                                    <th width="20%">投资范围</th>
                                    <th width="15%">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @if($orgs)
                                @foreach($orgs as $org)
                                <tr>
                                    <td>{{$org->invest_name}}</td>
                                    <td>{{date('Y-m',strtotime($org->begin_date))}}</td>
                                    <td>{{$org->invest_money}}</td>
                                    <td>@if($org->minquato && $org->maxquato)
                                            {{$org->minquato}}-{{$org->maxquato}}万
                                        @else
                                            暂无数据
                                        @endif
                                    </td>

                                    @if($org->status == 1)
                                        <td class="success">审核通过</td>
                                    @elseif($org->status == -2)
                                        <td class="warning">审核未通过</td>
                                    @else
                                        <td>
                                            <button type="button" class="btn btn-info org_over" data="{{$org->id}}">审核通过</button>
                                            <button type="button" class="btn org_out"  data="{{$org->id}}">审核未通过</button>
                                        </td>
                                    @endif

                                </tr>
                                @endforeach
                                @endif
                                </tbody>
                            </table>
                        </div>
                        <div class="pagination">
                            <ul>
                                {!! $orgs->render() !!}
                            </ul>
                        </div>
                    </div>
                </div>

    <script>
        var CheckOverInvestOrg = "{{route('Api.Admin.CheckOverInvestOrg' , ['auth'=>1])}}";
        var CheckOutInvestOrg = "{{route('Api.Admin.CheckOutInvestOrg' , ['auth'=>-2])}}";
    </script>
    <script src="{{url('/js/admin/check.js')}}"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });

        $('#nav_tab a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        })

    </script>

@endsection


